Xbasic

a5wcb_scaleImagePrompt Function

Syntax

dim result as c = a5wcb_scaleImagePrompt(settings as c [, flagServingImage as L])

Arguments

settingsCharacter

A string containing options set in the Scale Image dialog. Pass in an empty string to open the dialog in its initial state.

flagServingImageLogical

Default = .f.. Defines the help text to display in the dialog if the image is being uploaded (.f.) or downloaded (.t.).

Returns

resultCharacter

Returns a string containing the options selected in the prompt. The result can be passed to the a5_scaleImageFileUsingImageMagic() function to scale an image.

Description

Opens the "Scale Image" dialog to generate a scaling command to be used with the a5_scaleImageFileUsingImageMagic() function.

Example

dim command as c
command = a5wcb_scaleImagePrompt("")
? command
= "method=proportional,units=inches,maxSize=2,appliesTo=width"

dim fileIn as c = "C:/temp/img.jpg"
dim fileOut as c = "C:/temp/img_scaled.jpg"

? a5_scaleImageFileUsingImageMagic(fileIn, fileOut, command)
= "-resize 192"

Limitations

Desktop Applications Only

See Also